package com.edu.controller;


import com.edu.service.IPayService;
import com.edu.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("pay")
public class PayController {

    @Autowired
    private IPayService payService;

    //订单支付
    @RequestMapping("orderPay")
    public Result pay(String orderId){

        return payService.pay(orderId);
    }

    //微信支付系统信息回调
    @RequestMapping("/notify")
    public String notify(HttpServletRequest request){
        return payService.notify(request);
    }
}
